Utility Functions for Sequence Grabber Channel Components
Sequence grabber components provide several utility functions that your channel component can use. This section discusses those functions.The
SGAddMovieData
function lets you add data and sample references to a movie.Alternatively, you can use the
SGWriteMovieData
function to add data to a movie, and theSGAddFrameReference
andSGGetNextFrameReference
functions to keep track of sample references prior to creating a QuickTime movie from recorded data.The
SGSortDeviceList
function allows you to sort the entries in the device list that you create for the sequence grabber when it calls yourSGGetChannelDeviceList
function (which is discussed on page 6-57).The
SGChangedSource
function allows you to tell the sequence grabber that you have changed your source device.The
SGAddFrameReference
andSGGetNextFrameReference
functions take a pointer to a frame information structure as a parameter. TheSeqGrabFrameInfo
data type defines the format of a frame information structure.
struct SeqGrabFrameInfo { long frameOffset; /* offset to the sample */ long frameTime; /* time that frame was captured */ long frameSize; /* number of bytes in sample */ SGChannel frameChannel; /* current connection to channel */ long frameRefCon; /* reference constant for channel */ };
Field Description
frameOffset
- Specifies the offset to the sample. Your channel component obtains this value from the
SGWriteMovieData
function, described on page 6-84.frameTime
- Specifies the time at which your channel component captured the frame. This time value is relative to the data sequence. That is, this time is not represented in the context of any fixed time scale. Rather, your channel component must choose and use a time scale consistently for all sample references.
frameSize
- Specifies the number of bytes in the sample described by the sample reference.
frameChannel
- Identifies the current connection to your channel.
frameRefCon
- Contains a reference constant for use by your channel component. You can use this value in any way that is appropriate for your channel component. For example, video channel components may use this value to store a reference to frame differencing information for a temporally compressed image sequence.
Subtopics
- SGAddMovieData
- SGWriteMovieData
- SGAddFrameReference
- SGGetNextFrameReference
- SGSortDeviceList
- SGChangedSource
Main | Top of Section | What's New | Apple Computer, Inc. | Find It | Feedback | Help